# -*- coding: utf-8 -*-
# standard
import os
import sys

# third

# local
_P_PATH =  os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
if _P_PATH not in sys.path:
    sys.path.append(_P_PATH)
from models import *


"""
@Title:   
@File: env_func.py
@Author: walle 2025年08月15日 14时22分03秒
@Version: 1.0.0
@Desc: 
"""


ALI_SERVER_IPS = [  # 阿里云服务器列表
    "106.14.56.64", # 阿里云应用服务器1
    "47.100.174.27", # 阿里云应用服务器2
]


def get_server_env_by_ip(ip: str) -> str:
    if ip.startswith("61.169.129."):
        env = "uat"
    elif ip in ALI_SERVER_IPS:
        env = "pro"
    else:
        env = "dev"
    return env
    


if __name__ == '__main__':
    pass